class_name Bullet
extends Area2D

var move_speed: float = 800
var move_direction := Vector2.UP:
	set(v):
		move_direction = v.normalized()
		
@onready var animation_player: AnimationPlayer = $AnimationPlayer


func _process(delta: float) -> void:
	if not animation_player.is_playing():
		position += move_direction * move_speed * delta


func _on_visible_on_screen_notifier_2d_screen_exited() -> void:
	queue_free()
